<div class="frame_introDiv">
<form name="headimg_form" id="headimg_form" action="adminb<?=CHOSING_DE?>info<?=CHOSING_DE?>doheadimg" enctype="multipart/form-data" method="post">
  <!--企业 -->
    <!--个人-->
  <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#c8d9e9">
    <tr>
      <td width="27%" class="ri-bbgg"> Upload Headimg：</td>
      <td width="73%" class="le">
      		<span><input name="productpic" type="file" /></span> <input type="button" onclick="uploadImg(this);" value="上传" />
			<div id="productImages">
				<?php if($this->buyerArray['headimg'] != ''):?>
				<div style="margin:10px"><a href="<?php echo $this->buyerArray['headimg']?>" target="_blank"><img style="height:100px;width:100px;vertical-align:middle;" src="<?php echo $this->buyerArray['headimg']?>" /></a><input type="hidden" id="headimg" name="headimg" value="<?php echo $this->buyerArray['headimg']?>" />
				<?php endif;?>
			</div>
      </td>
    </tr>
    <tr>
      <td width="27%" class="ri-bbgg">&nbsp;</td>
      <td width="73%" class="le">
      	<input type="submit" value=" Save " />
      </td>
    </tr>
  </table>
  </form>
</div>
<iframe id="productIframe" width="0" height="0" name="productIframe"></iframe>
<script type="text/javascript">
	upload.type='info';
	upload.formid='headimg_form';
	
	function uploadImg(thisInput){
		upload.setAppend=function(imgurl){
			return '<div style="margin:10px"><a href="'+imgurl+'" target="_blank"><img style="height:100px;width:100px;vertical-align:middle;" src="'+imgurl+'" /></a><input type="hidden" id="headimg" name="headimg" value="'+imgurl+'" /></div>';
		}
	     upload.setImg=function(imgurl){
	        this.imgurl=imgurl;
			$('#productImages').html(this.setAppend(imgurl));
			parent.shutMsg();
			commonEffection.resetFrame('admins_frame',true);
		}
		upload.uploadimg(thisInput);
	}
</script>